//
//  ViewController.m
//  CocoaSyncSocket
//
//  Created by 崔逢举  on 20/03/28.
//  Copyright © 2020年 崔逢举 . All rights reserved.
//

#import "ViewController.h"
#import "SocketManager.h"

#define KScreenWidth     [UIScreen mainScreen].bounds.size.width


@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@property (weak, nonatomic) IBOutlet UIButton *connectBtn;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    [self.connectBtn addTarget:self action:@selector(connectAction) forControlEvents:UIControlEventTouchUpInside];
    
    
    [SocketManager shareInstance].recvImg = self.imageView;
    
}

//连接
- (void)connectAction {
    [[SocketManager shareInstance] accept];
    
}

//发送消息
- (IBAction)sendMessage:(UIButton *)sender {
    [[SocketManager shareInstance] sendMsg];
}



@end
